package com.aspose.cells;

import java.util.Iterator;

class zds extends CollectionBase {
   private zra b;

   zds(zra var1) {
      this.b = var1;
   }

   void a(zds var1) {
      Iterator var2 = var1.iterator();

      while(var2.hasNext()) {
         zcb var3 = (zcb)var2.next();
         zcb var4 = new zcb();
         var4.a(var3);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var4);
      }

   }

   long a() {
      long var1 = 0L;

      zcb var4;
      for(Iterator var3 = this.iterator(); var3.hasNext(); var1 = (var1 & 4294967295L) + 8L + (var4.c() & 4294967295L)) {
         var4 = (zcb)var3.next();
      }

      return var1;
   }

   public zcb a(int var1) {
      return (zcb)this.a.get(var1);
   }

   int a(zcb var1, int var2, boolean var3) {
      if (var3) {
         var1.i();
         return var2;
      } else {
         for(int var4 = 0; var4 < this.getCount(); ++var4) {
            zcb var5 = this.a(var4);
            boolean var6 = true;

            for(int var7 = 0; var7 < 16; ++var7) {
               if (var1.g().c[var7] != var5.g().c[var7]) {
                  var6 = false;
                  break;
               }
            }

            if (var6) {
               var5.i();
               return var4 + 1;
            }
         }

         zcb var8 = new zcb();
         var8.a(var1);
         var8.i();
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var8);
         return this.getCount();
      }
   }

   void a(zcb var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   int b(zcb var1) {
      byte[] var2 = var1.h();

      for(int var3 = 0; var3 < this.getCount(); ++var3) {
         zcb var4 = this.a(var3);
         boolean var5 = true;

         for(int var6 = 0; var6 < 16; ++var6) {
            if (var2[var6] != var4.g().c[var6]) {
               var5 = false;
               break;
            }
         }

         if (var5) {
            var4.i();
            return var3;
         }
      }

      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
      return this.getCount() - 1;
   }

   int a(byte[] var1) throws Exception {
      try {
         zcb var2 = new zcb(var1, this.b.i().L());
         return this.b(var2);
      } catch (Exception var3) {
         throw new CellsException(6, "Unknown image format", var3);
      }
   }

   // $FF: synthetic method
   public Object get(int x0) {
      return this.a(x0);
   }
}
